import sys

n_list = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]

k = 0
for i in range(3):
    n = input()
    for i in range(10):
        if n == n_list[i]:
            print(i, end=" ")
            k += 1
            break
    if k == 0:
        print("Wrong Input")
        sys.exit()
    k = 0
